<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>时钟</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        #box{
            background-color: rgb(145, 215, 238);
            width: 400px;
            height: 400px;
            border-radius: 30px;
            margin: 100px auto;
        }
        #time{
            font-size: 30px;
            color: rgb(245, 83, 110);
            text-align: center;
            line-height: 115px;
        }
        #day_box{
            background-color: rgb(251, 143, 161);
            width: 200px;
            height: 200px;
            margin: auto auto;
            border-radius: 15px;
        }
        #day{
            color: gray;
            font-size: 100px;
            text-align: center;
            line-height: 180px;
        }

    </style>
</head>
<body>
    <div id="box">
        <p id="time"></p>
        <div id="day_box">
            <p id="day"></p>
        </div>
    </div>
    <script>
        
        // console.log(now_date)
           
        setInterval(function(){
            var new_date = new Date();  
            var now_date = new_date.toLocaleString();
            var time = document.getElementById('time')
            time.innerHTML = now_date;
        },10)
        setInterval(function(){
            var new_date = new Date();  
            var now_day = new_date.getDate()    
            var day = document.getElementById('day')
            day.innerHTML = now_day;
        },10)

    </script>
</body>
</html>